package org.zcl.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.zcl.annotation.ApiPath;
import org.zcl.entity.User;

import javax.servlet.http.HttpServletRequest;

/**
 * .
 *
 * @author zhuchenglin
 * @since 2024/8/6 10:32
 */

@RestController
@ApiPath("/simple")
public class SimpleApi implements SimpleContract {


    public Integer getString(@PathVariable("id") Integer id, HttpServletRequest request) {
        return id;
    }

    public User getById(@PathVariable(value = "id") Long id) {
        // openfeign-test
        return User.builder().id(id).name("zcl").age(29).build();
    }
}
